import request from '@/utils/request'

// 获取所有医生信息列表
export function getAllDoctor(params) {
  return request({
    url: '/doctor/target',
    method: 'get',
    params
  })
}

// 预约挂号
export function reserveOnline(params) {
  return request({
    url: '/appiontment/createonline',
    method: 'post',
    data: params
  })
}

// 获取单个医生的具体时间表
export function doctorReserveTable(params) {
  return request({
    url: '/appiontment/availableslots',
    method: 'get',
    params
  })
}

// 预约支付
export function payOnline(params) {
  return request({
    url: '/appiontment/onlinepayment',
    method: 'post',
    data: params
  })
}

// 获取病人的预约信息
export function patientReserve(params) {
  return request({
    url: '/appiontment/myappointments',
    method: 'get',
    params
  })
}
